package com.bzy.blade_auth.controller;

import com.baomidou.mybatisplus.extension.api.R;
import com.bzy.blade_auth.service.JurisdictionService;
import com.bzy.bladeauthapi.entry.Jurisdiction;
import com.bzy.bladeauthapi.fegin.JurisdictionFeginClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 权限管理;
 */
@RestController
public class JurisdictionController implements JurisdictionFeginClient {

    @Autowired
    private JurisdictionService jurisdictionService;

    @Override
    @PostMapping(add)
    public R add(@RequestBody Jurisdiction jurisdiction) {
        return jurisdictionService.add(jurisdiction);
    }

    @Override
    @PostMapping(uodate)
    public R uodate(Jurisdiction jurisdiction) {
        return jurisdictionService.uodate(jurisdiction);
    }

    @Override
    @PostMapping(delete)
    public R delete(Jurisdiction jurisdiction) {
        return jurisdictionService.uodate(jurisdiction);
    }

    @Override
    @PostMapping(selOne)
    public R selOne(Jurisdiction jurisdiction) {
        return jurisdictionService.uodate(jurisdiction);
    }

    @Override
    @PostMapping(selList)
    public R selList(Jurisdiction jurisdiction) {
        return jurisdictionService.uodate(jurisdiction);
    }
}
